using System;
using System.Collections.Generic;
using XenoGears.Functional;
using XenoGears.Reflection;

namespace Jink.Playground.Domain
{
    internal class SPListItem
    {
        public SPList List { get; private set; }
        public Dictionary<String, Object> Fields { get; set; }

        public SPListItem(SPList list)
        {
            List = list;
        }

        public SPListItem(SPList list, IDictionary<String, Object> fields)
            : this(list)
        {
            Fields = fields.ToDictionary();
        }

        public SPListItem(SPList list, Object prototype)
            : this(list, prototype.ToPropertyBag())
        {
        }
    }
}